package com.yc.wxcontroller;

import com.yc.service.impl.StudentInfoServiceImpl;
import com.yc.vo.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author mqm
 * @version 1.0
 * @date 2023/7/8 16:12
 */
@RestController
public class WXStuQueryController {

    @Resource
    private StudentInfoServiceImpl studentInfoService;

    /**
     * 查出个人信息
     * @param stuid
     * @return
     */
    @ApiOperation("查出个人信息")
    @PostMapping("wx/query")
    public Result<Map<String,Object>> querystuByStuid(String stuid){
        Map<String, Object> map = studentInfoService.queryStuBystuid(stuid);
        return Result.success(map);
    }

    @PostMapping("wx/querySch")
    public Result querySch( @RequestParam("stuid") String stuid,@RequestParam("date") String date){
        List<Map<String, Object>> maps = studentInfoService.querySch(stuid, date);
        return Result.success(maps);
    }
}
